package com.eBook.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eBook.dao.BookTypeDao;
import com.eBook.entity.Book;
import com.eBook.entity.BookType;
import com.eBook.service.BookTypeService;

@Service
public class BookTypeServiceImpl implements BookTypeService {

	@Autowired
	BookTypeDao bookTypeDao;
	
	/**
	 * 找到所有的类别
	 */
	@Override
	public List<BookType> findAllType() {
		// TODO Auto-generated method stub
		return bookTypeDao.findAllType();
	}

	/**
	 * 找到本类别下的所有书籍
	 * @param typeId
	 * @return
	 */
	@Override
	public List<Book> findBookByTypeId(String typeId) {
		// TODO Auto-generated method stub
		return bookTypeDao.findBookByTypeId(typeId);
	}

}
